import http from'@/util/request.js'
export default {
    captcha:()=>{
        return http({
            url:'/api/user/login/captcha',
            method:'get'
        });
    },
    login:(obj)=>{
        return http({
            url:'/api/user/login/userDoLogin',
            method:'post',
            params:obj
        });
    },
    adminLogin:(obj)=>{
        return http({
            url:'/api/user/login/adminDoLogin',
            method:'post',
            params:obj
        });
    },
    logininfo:()=>{
        return http({
            url:'/api/user/login/logininfo',
            method:'get'
        });
    },
    // 发送重置密码验证码
    sendResetCode: (data) => {
        return http({
            url: '/api/user/login/send-reset-code',
            method: 'post',
            data: data,
            headers: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 验证重置密码验证码
    verifyResetCode: (data) => {
        return http({
            url: '/api/user/login/verify-reset-code',
            method: 'post',
            data: data,
            headers: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 重置密码
    resetPasswordByEmail: (data) => {
        return http({
            url: '/api/user/login/reset-password-by-email',
            method: 'post',
            data: data,
            headers: {
                'Content-Type': 'application/json'
            }
        })
    }
}
